package org.terramagnet.http.signature.impl;

import org.terramagnet.http.signature.Signer;


/**
 * 需要秘钥的签名方法.
 *
 * @author lip
 */
public abstract class AbstractSecretSigner implements Signer {

	private String secret;
	private String name="sign";

	/**
	 * 秘钥.
	 */
	protected String secret() {
		return secret;
	}

	@Override
	public Signer secret(String secret) {
		this.secret = secret;
		return this;
	}

	/**
	 * 设置签名参数名.
	 */
	protected Signer name(String name) {
		this.name = name;
		return this;
	}

	@Override
	public String name() {
		return name;
	}
}
